package org.springblade.modules.admin.vo.sugar;

import cn.hutool.core.convert.Convert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.modules.system.entity.User;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author zcc
 * @version 1.0
 * @date 2021/12/16 10:58
 */
@ApiModel("保养明细MOdel")
@Data
public class BuildingMaintainDetailVo {

	@ApiModelProperty("小区名称")
	private String buildingName;

	@ApiModelProperty("小区名称")
	private Integer buildingType;

	@ApiModelProperty("小区类型")
	private String buildingTypeName;

	@ApiModelProperty("电梯数量")
	private Integer elevatorCounts = 0;

	@ApiModelProperty("完成率")
	private BigDecimal finishRatio = Convert.toBigDecimal(0);

	@ApiModelProperty("及时率")
	private BigDecimal timelinessRatio =  Convert.toBigDecimal(0);

	@ApiModelProperty("有效率")
	private BigDecimal effectiveRatio = Convert.toBigDecimal(0);

	@ApiModelProperty("维保员信息")
	private List<User> list;

	public void setBuildingType(Integer buildingType) {
		this.buildingType = buildingType;
		if(buildingType==1){
			this.buildingTypeName="小区";
		}else if(buildingType==2){
			this.buildingTypeName="别墅";
		}else if(buildingType==3){
			this.buildingTypeName="商超";
		}else if(buildingType==4){
			this.buildingTypeName="酒店/民宿";
		}else if(buildingType==5){
			this.buildingTypeName="学校";
		}else if(buildingType==6){
			this.buildingTypeName="医院";
		}else if(buildingType==7){
			this.buildingTypeName="工厂";
		}else if(buildingType==8){
			this.buildingTypeName="其他";
		}else if(buildingType==9){
			this.buildingTypeName="办公楼";
		}else if(buildingType==10){
			this.buildingTypeName="政府单位";
		}else if(buildingType==11){
			this.buildingTypeName="公共设施";
		}else if(buildingType==12){
			this.buildingTypeName="出租房";
		}



	}
}
